﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using balancescorecard.utils;

namespace balancescorecard
{
    public partial class masterPage : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            switch ((Roles)Session[ApplicationConstants.SESSION_ROLE.ToString()])
            {
                case Roles.EMPLOYEE:

                    break;
                case Roles.HR:

                   
                    break;
                default:
                    break;
            }

            Menu[] menus = (Menu[])Session[ApplicationConstants.MENU_LIST.ToString()];

            MenuItem master = new MenuItem("Masters");
            master.NavigateUrl = "";

            foreach (Menu menu in menus)
            {
                MenuItem menuItem = new MenuItem();
                menuItem.Text = menu.menuName;
                menuItem.NavigateUrl = menu.menuLink;
                master.ChildItems.Add(menuItem);
            }

            applicationMenu.Items.Add(master);

        }
    }
}
